<?php

/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/8/20
 * Time: 14:44
 */
class 通过站长站获取网站百度权重
{

}
//通过站长站获取网站百度权重的PHP代码
function br($s){
    $baidu="http://mytool.chinaz.com/baidusort.aspx?host=".$s;
    $site=file_get_contents($baidu);
    preg_match("/<font color=\"\">(.*)<\/font>/i",$site,$count);
    return $count[1][0];
}
$br=br("http://xxx.com");
echo $br;